import {Component, OnInit} from '@angular/core';
import {EntityService} from '../../shared/services/entity.service';
import {UserService} from '../service/user.service';
import {IPDialog, PDialog} from '../../shared/model/share.model';

@Component({
  selector: 'app-user-index',
  template: `
    <app-base-index></app-base-index>
    <button (click)="detail()">11</button>
    <app-base-dialog [dialog]="dialogDetail">
      wwerw<br/>
      23424
    </app-base-dialog>
  `,
  providers: [ { provide: EntityService , useClass: UserService} ]
})
export class UserIndexComponent implements OnInit {
  // demo_html = require('!!html-loader!./basic.component.html');
  demo_ts = require('!!raw-loader!../config/user.config.ts');
  dialogDetail: PDialog = new PDialog();
  constructor(
    private userService: EntityService
  ) {}

  ngOnInit() {
  }
  detail() {
    this.dialogDetail.show({
      header: '1231',
      width: '500',
      yes: (res) => {
        console.log(3333);
      }
    });
  }
}
